package edu.xjtu.jih.selfDemands;

import org.apache.ibatis.annotations.*;

import java.util.List;
@Mapper

public interface SelfDemandsDao {
    //where items.item_id=user_item.item_id and user_item.u_id=id
    @Select("select * from items ")
    List<SelfDemands> findSelfDemandsList();
    /*@Insert("insert into items(item_id,item_name,item_price,item_image,item_desc,item_label,status) values(#{item_id},#{item_name},#{item_price},#{item_image},#{item_desc},#{item_label},#{status})")
    void insertItem(SelfDemandsDto dto);*/
    @Update("update items set item_name = #{item_name},item_price = #{item_price},item_desc = #{item_desc},item_label = #{item_label} where item_id = #{item_id}")
    void updateSelfDemands(SelfDemandsDto dto);


    @Delete("delete from items where item_id = #{item_id}")
    void deleteSelfDemands(int t_id);

}
